package br.com.fidalgotecnologia.layar.json;

import java.util.List;

import org.json.JSONArray;

import br.com.fidalgotecnologia.layar.entity.HotSpot;



public class HotSpotJsonArray {
	private static HotSpotJsonArray instance;

	public static HotSpotJsonArray getInstance() {
		if(instance == null){
			instance = new HotSpotJsonArray();
		}
		return instance;
	}
	
	public JSONArray toArray(List<HotSpot> listHotSpot ){
		JSONArray hotSpotArray = new JSONArray();
		for(HotSpot hotspot: listHotSpot){
			hotSpotArray.put(HotSpotJson.getInstance().toObject(hotspot));		
		}
		return hotSpotArray;
		
	}
	

}
